<a href="https://marked.js.org">
  <img width="60px" height="60px" src="https://marked.js.org/img/logo-black.svg" align="right" />
</a>

<h1 id="Marked"><a href="#Marked" class="headerlink" title="Marked"></a>Marked</h1><p><a href="https://www.npmjs.com/package/marked"><img src="https://badgen.net/npm/v/marked" alt="npm"></a><br><a href="https://cdn.jsdelivr.net/npm/marked/marked.min.js"><img src="https://badgen.net/badgesize/gzip/https://cdn.jsdelivr.net/npm/marked/marked.min.js" alt="gzip size"></a><br><a href="https://packagephobia.now.sh/result?p=marked"><img src="https://badgen.net/packagephobia/install/marked" alt="install size"></a><br><a href="https://www.npmjs.com/package/marked"><img src="https://badgen.net/npm/dt/marked" alt="downloads"></a><br><a href="https://github.com/markedjs/marked/actions"><img src="https://github.com/markedjs/marked/workflows/Tests/badge.svg" alt="github actions"></a><br><a href="https://snyk.io/test/npm/marked"><img src="https://snyk.io/test/npm/marked/badge.svg" alt="snyk"></a></p>
<ul>
<li>⚡ built for speed</li>
<li>⬇️ low-level compiler for parsing markdown without caching or blocking for long periods of time</li>
<li>⚖️ light-weight while implementing all markdown features from the supported flavors &amp; specifications</li>
<li>🌐 works in a browser, on a server, or from a command line interface (CLI)</li>
</ul>
<h2 id="Demo"><a href="#Demo" class="headerlink" title="Demo"></a>Demo</h2><p>Checkout the <a href="https://marked.js.org/demo/">demo page</a> to see marked in action ⛹️</p>
<h2 id="Docs"><a href="#Docs" class="headerlink" title="Docs"></a>Docs</h2><p>Our <a href="https://marked.js.org/">documentation pages</a> are also rendered using marked 💯</p>
<p>Also read about:</p>
<ul>
<li><a href="https://marked.js.org/#/USING_ADVANCED.md">Options</a></li>
<li><a href="https://marked.js.org/#/USING_PRO.md">Extensibility</a></li>
</ul>
<h2 id="Compatibility"><a href="#Compatibility" class="headerlink" title="Compatibility"></a>Compatibility</h2><p><strong>Node.js:</strong> Only <a href="https://nodejs.org/en/about/releases/">current and LTS</a> Node.js versions are supported. End of life Node.js versions may become incompatible with Marked at any point in time.</p>
<p><strong>Browser:</strong> Not IE11 :)</p>
<h2 id="Installation"><a href="#Installation" class="headerlink" title="Installation"></a>Installation</h2><p><strong>CLI:</strong> <code>npm install -g marked</code></p>
<p><strong>In-browser:</strong> <code>npm install marked</code></p>
<h2 id="Usage"><a href="#Usage" class="headerlink" title="Usage"></a>Usage</h2><h3 id="Warning-🚨-Marked-does-not-sanitize-the-output-HTML-Please-use-a-sanitize-library-like-DOMPurify-recommended-sanitize-html-or-insane-on-the-output-HTML-🚨"><a href="#Warning-🚨-Marked-does-not-sanitize-the-output-HTML-Please-use-a-sanitize-library-like-DOMPurify-recommended-sanitize-html-or-insane-on-the-output-HTML-🚨" class="headerlink" title="Warning: 🚨 Marked does not sanitize the output HTML. Please use a sanitize library, like DOMPurify (recommended), sanitize-html or insane on the output HTML! 🚨"></a>Warning: 🚨 Marked does not <a href="https://marked.js.org/#/USING_ADVANCED.md#options">sanitize</a> the output HTML. Please use a sanitize library, like <a href="https://github.com/cure53/DOMPurify">DOMPurify</a> (recommended), <a href="https://github.com/apostrophecms/sanitize-html">sanitize-html</a> or <a href="https://github.com/bevacqua/insane">insane</a> on the output HTML! 🚨</h3><p><strong>CLI</strong></p>
<pre><code class="bash"># Example with stdin input
$ marked -o hello.html
hello world
^D
$ cat hello.html
&lt;p&gt;hello world&lt;/p&gt;
</code></pre>
<pre><code class="bash"># Print all options
$ marked --help
</code></pre>
<p><strong>Browser</strong></p>
<pre><code class="html">&lt;!doctype html&gt;
&lt;html&gt;
&lt;head&gt;
  &lt;meta charset=&quot;utf-8&quot;/&gt;
  &lt;title&gt;Marked in the browser&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
  &lt;div id=&quot;content&quot;&gt;&lt;/div&gt;
  &lt;script src=&quot;https://cdn.jsdelivr.net/npm/marked/marked.min.js&quot;&gt;&lt;/script&gt;
  &lt;script&gt;
    document.getElementById(&#39;content&#39;).innerHTML =
      marked.parse(&#39;# Marked in the browser\n\nRendered by **marked**.&#39;);
  &lt;/script&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>
<h2 id="License"><a href="#License" class="headerlink" title="License"></a>License</h2><p>Copyright (c) 2011-2018, Christopher Jeffrey. (MIT License)</p>
